home *** CD-ROM | disk | FTP | other *** search
/ Programming in Microsoft Windows with C# / Programacion en Microsoft Windows con C#.iso / Codigo / Trazados, regiones y recorte / WidePolyline / WidePolyline.cs next >
Encoding:
Text File  |  2002-06-18  |  819 b   |  28 lines

  1. //-------------------------------------------
  2. // WidePolyline.cs ⌐ 2001 by Charles Petzold
  3. //-------------------------------------------
  4. using System;
  5. using System.Drawing;
  6. using System.Windows.Forms;
  7.  
  8. class WidePolyline: PrintableForm
  9. {
  10.      public new static void Main()
  11.      {
  12.           Application.Run(new WidePolyline());
  13.      }
  14.      public WidePolyline()
  15.      {
  16.           Text = "Polilφnea ancha";
  17.      }
  18.      protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
  19.      {
  20.           Pen pen = new Pen(clr, 25);
  21.  
  22.           grfx.DrawLines(pen, new Point[] {
  23.                          new Point( 25, 100), new Point(125, 100),
  24.                          new Point(125,  50), new Point(225,  50),
  25.                          new Point(225, 100), new Point(325, 100) });
  26.      }
  27. }
  28.